
#ifndef __FU681X_HALL_H
#define __FU681X_HALL_H

	#if (HALL_IO_IC==HALLSEL_0)
	
		#define  HA_PIN             P02   //  for dabang  by shiyan 
		#define  HA_GPIO_PORT       P0_OE
		#define  HA_PU              P0_PU

		#define  HB_PIN             P37
		#define  HB_GPIO_PORT       P3_OE
		#define  HB_PU              P3_PU
		
		

		#define  HC_PIN             P36
		#define  HC_GPIO_PORT       P3_OE
		#define  HC_PU              P3_PU

		#define HA  GP02   //  for dabang  by shiyan 
		#define HB  GP37
		#define HC  GP36
	
	#elif (HALL_IO_IC==HALLSEL_1)
	
		#define  HA_PIN             P14
		#define  HA_GPIO_PORT       P1_OE
		#define  HA_PU              P1_PU

		#define  HB_PIN             P16
		#define  HB_GPIO_PORT       P1_OE
		#define  HB_PU              P1_PU

		#define  HC_PIN             P21
		#define  HC_GPIO_PORT       P2_OE
		#define  HC_PU              P2_PU

		#define HA  GP14
		#define HB  GP16
		#define HC  GP21
	
	#endif



extern uint8  idata MotorDirection;
//extern  	uint8  l_h_flag;



extern void Hall_IRQHandler(void);
extern void Hallinit(void);
extern void Drv_SetStep(void);

extern void DRV_HallEventCalc(void);
//extern void DRV_HallEventCalD(void);
extern void AdvanceEangle(void);
extern void BEMFSpeedDetect(void);
extern void BEMFSpeedCal(void);
//extern void Hall_init_s(void);

#endif
